<?php

namespace Yolo\Observers;

interface ObserverInterface
{
    /**
     * The list of events this observer is listening to.
     * @return string[]
     */
    public function listens(): array;

    /**
     * Process the event.
     * @param string $event The name of the event.
     * @param array $data The data of the event.
     * @return void
     */
    public function process(string $event, array $data): void;
}
